package com.fulihui.usercore.core.repository;

import java.util.List;

import com.fulihui.usercore.dto.CustomerDTO;

/**
 * 客户信息仓储操作类
 * @author Willard.Hu on 2016/11/9 0009.
 */
public interface CustomerRepositoery {

    /**
     * 创建客户信息
     * @param customerDTO {@link CustomerDTO}
     * @return 客户唯一标识 customerId
     */
    String create(CustomerDTO customerDTO);

    /**
     * 修改客户信息
     * @param customerDTO {@link CustomerDTO}
     * @return 修改结果
     */
    boolean modify(CustomerDTO customerDTO);

    /**
     * 通过主键查询客户信息
     * @param customerId 客户唯一标识
     * @return {@link CustomerDTO}
     */
    CustomerDTO queryByPK(String customerId);

    /**
     * 按查询条件查询客户信息
     * @param condition {@link CustomerDTO}
     * @return 查询的客户信息列表 {@link CustomerDTO}
     */
    List<CustomerDTO> query(CustomerDTO condition);

}
